fix(dock): prevent menu hide after touch long-press#1651
Conversation
1. Add touchLongPressed flag to track touch long-press state 2. Skip mouse release handler when touch long-press was active 3. Reset flag on touch canceled to avoid stale state Log: Fix right-click menu auto-hiding after touch long-press on taskbar fix(dock): 修复长按任务栏后松手右键菜单自动隐藏的问题 1. 添加 touchLongPressed 标志位以跟踪触摸长按状态 2. 触摸长按激活时跳过鼠标释放事件的处理 3. 触摸取消时重置标志位,避免状态残留 Log: 修复长按任务栏应用和空白区域松开手指后右键菜单面板自动隐藏的问题 PMS: BUG-367313
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: MyLeeJiEun The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @MyLeeJiEun. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideIntroduces a touchLongPressed state on the dock container’s touch handler to distinguish between simple taps and long-presses, ensuring the right-click menu is not auto-hidden when a long-press-initiated menu is followed by a touch release, and properly resets this state on cancellation. Sequence diagram for touch long-press handling on docksequenceDiagram
actor User
participant TouchHandler
participant DockContainer
participant MenuHelper
participant DockMenuLoader
User->>TouchHandler: onLongPressed
TouchHandler->>DockContainer: touchLongPressed = true
TouchHandler->>MenuHelper: closeCurrent()
TouchHandler->>DockMenuLoader: active = true
TouchHandler->>DockContainer: requestShowDockMenu()
User->>TouchHandler: onTapped
TouchHandler->>DockContainer: check touchLongPressed
alt [touchLongPressed == true]
TouchHandler->>DockContainer: touchLongPressed = false
TouchHandler-->>MenuHelper: skip closeCurrent()
else [touchLongPressed == false]
TouchHandler->>MenuHelper: closeCurrent()
TouchHandler->>DockMenuLoader: active = true
TouchHandler->>DockContainer: requestShowDockMenu()
end
User->>TouchHandler: onCanceled
TouchHandler->>DockContainer: touchLongPressed = false
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Log: Fix right-click menu auto-hiding after touch long-press on taskbar
fix(dock): 修复长按任务栏后松手右键菜单自动隐藏的问题
Log: 修复长按任务栏应用和空白区域松开手指后右键菜单面板自动隐藏的问题
PMS: BUG-367313
Summary by Sourcery
Bug Fixes: